#ifndef IMAGE_CATCHER_H
#define IMAGE_CATCHER_H

#include <iostream>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui.hpp"

class ImageCatcher
{
private:
    int width, height;
	char pixelFormat[4]{};
    cv::Mat frame;
	char outputFilename[100]{};
	const char *getFilename();
	cv::VideoCapture capture;
public:
    ImageCatcher(int deviceID, int width, int height, const char pixelFormat[]);
    ~ImageCatcher();
    cv::Mat& getFrame();
    void showVideoStream();
	static void showVideoStream(ImageCatcher& imageCatcher);
	static void showFrame(cv::Mat &frame, int scale, const char *winName);
	int getWidth() const;
	void setWidth(int width);
	int getHeight() const;
	void setHeight(int height);
	void setFilename(const char filename[]);
};

#endif //IMAGE_CATCHER_H